package presentation;

import businessEntities.FilesConfig;
import businessEntities.MainLogger;

import java.io.File;

public class Run {
    
    public static void main(String[] args) {
        
        MainLogger.logger.info("######      Program started      ######");

        File workspaceDir = new File (FilesConfig.WORKSPACE_DIR_PATH);
        if(!workspaceDir.exists()){
            workspaceDir.mkdir();
        }
        
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(ConnectionScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }

        javax.swing.SwingUtilities.invokeLater(new Runnable() {

            public void run() {
                new ConnectionScreen().setVisible(true);
            }
        });
    }
}
